<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <style>
        .father, .father1 {
            width: 300px;
            height: 300px;
            margin-top: 20px;
            background-color: orange;
        }

        .son, .son1 {
            width: 150px;
            height: 150px;

            background-color: red;
        }
    </style>
</head>
<body>
    <div class="father">
        <div class="son"></div>
    </div>

    <div class="father1">
        <div class="son1"></div>
    </div>


    <script> 
        var father = document.querySelector('.father');
        var father1 = document.querySelector('.father1');
        father.addEventListener('mouseover',function() {
            console.log('mouseover事件被调用');
        })

        father1.addEventListener('mouseenter',function() {
            console.log("mouseenter事件被调用");
        })
    </script>
</body>
</html>